package edu.hitsz.aircraft;

import edu.hitsz.application.ImageManager;
import edu.hitsz.application.Main;

/**
 * @author CsCN
 */
public class EliteEnemyFactory implements EnemyFactory{
    @Override
    public AbstractEnemy createEnemy(double rate, double elitePossibility, int shootNum) {
        int randomDirect = (int) (Math.random() * 3) - 1;
        return new EliteEnemy(
                (int) (Math.random() * (Main.WINDOW_WIDTH - ImageManager.ELITE_ENEMY_IMAGE.getWidth())),
                (int) (Math.random() * Main.WINDOW_HEIGHT * 0.2),
                (int) (4 * randomDirect * rate),
                (int) (8 * rate),
                (int) (40 * rate),
                shootNum
        );
    }
}
